package com.wx.javacode.poly_.polyarr_;

/**
 * ClassName:Teacher
 * Package :com.wx.javacode.poly_.polyarr_
 * Description :
 *
 * @Author : coder_mu
 * @Create : 2023/5/20 - 21:32
 */
public class Teacher extends Person {
    private double salary;

    @Override
    public String say() {
        return "老师" + super.say() + " salary=" + salary;
    }

    //特有的方法
    public void teach() {
        System.out.println("老师" + getName() + "正在教学");
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public Teacher(String name, int age, double salary) {
        super(name, age);
        this.salary = salary;
    }
}
